package cn.newtouch.pet.controller;

import cn.newtouch.basic.annotation.PreAuthorize;
import cn.newtouch.basic.util.JsonResult;
import cn.newtouch.basic.util.PageList;
import cn.newtouch.pet.domain.Pet;
import cn.newtouch.pet.domain.PetType;
import cn.newtouch.pet.query.PetQuery;
import cn.newtouch.pet.service.IPetService;
import cn.newtouch.pet.service.IPetTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/petType")
@Api(value = "宠物类型的API",description="宠物类型相关的CRUD功能")
public class PetTypeController {

   @Autowired
    private IPetTypeService petTypeService;

   @GetMapping("/typeTree")
   public List<PetType> typeTree(){

       return petTypeService.typeTree();
   }


}
